package com.code.web.user;

import com.code.commons.web.annotations.ResponseResult;
import com.code.service.HelpFeedbackService;
import com.code.user.model.po.HelpFeedback;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 帮助与反馈管理控制器
 *
 * @author tangyifei
 * @since 2019年12月26日10:25:35
 */
@ResponseResult
@RestController("helpFeedbackController")
@RequestMapping("/helpFeedbacks")
public class HelpFeedbackController {

    @Resource
    private HelpFeedbackService helpFeedbackService;

    @ApiOperation(value = "添加帮助与反馈", response = HelpFeedback.class, notes = "添加帮助与反馈", httpMethod = "POST")
    @PostMapping
//    @LoginAuth
//    @RateLimit(key = "limitAddHelpFeedback")
    public HelpFeedback addHelpFeedback(@Validated @RequestBody HelpFeedback helpFeedback) {
        return helpFeedbackService.addHelpFeedback(helpFeedback);
    }

}
